import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Scanner ch = new Scanner(System.in);
        float a = in.nextFloat();
        String b = ch.nextLine();
        if (a <= 1.0 && !b.equals("y")){
            System.out.println(20);
        }else if(a <= 1.0 && b.equals("y")){
            System.out.println(25);
        }else if(a > 1.0 && !b.equals("y")){
            int ret = (int)(a*10);
            if(ret % 10 == 0){
                System.out.println(20+(int)a-1);

            }else{
                System.out.println(20+(int)a);
            }
        }else if(a > 1.0 && b.equals("y")){
            int ret = (int)(a*10);
            if(ret % 10 == 0){
                System.out.println(20+(int)a+4);

            }else{
                System.out.println(20+(int)a+5);
            }
        }

    }
}
